TscCommand Class Reference
| Inherits from | Command : NSObject |
|---|---|
| Declared in | TscCommand.h TscCommand.m |
– addSize:::
设置标签尺寸的宽和高(Sets the width and height of the label dimensions)
- (void)addSize:(int)width :Parameters
width |
标签宽度(The label width) |
|---|---|
height |
标签高度(The label height) |
Discussion
设置标签尺寸的宽和高(Sets the width and height of the label dimensions)
Declared In
TscCommand.h
– addGapWithM:withN:
设置标签间隙尺寸 单位mm(Sets the label gap size The unit of mm)
- (void)addGapWithM:(int)m withN:(int)nParameters
m |
间隙长度(The length of the gap) |
|---|---|
n |
间隙偏移(The interval offset) |
Discussion
设置标签间隙尺寸 单位mm(Sets the label gap size The unit of mm)
Declared In
TscCommand.h
– addReference:::
设置标签原点坐标(Sets the label origin coordinates)
- (void)addReference:(int)x :Parameters
x |
横坐标(abscissa) |
|---|---|
y |
纵坐标(ordinate) |
Discussion
设置标签原点坐标(Sets the label origin coordinates)
Declared In
TscCommand.h
– addSpeed:
设置打印速度(Set print speed)
- (void)addSpeed:(int)speedParameters
speed |
打印速度(The printing speed) |
|---|
Discussion
设置打印速度(Set print speed)
Declared In
TscCommand.h
– addDensity:
设置打印浓度(Set the print concentration)
- (void)addDensity:(int)densityParameters
density |
浓度(The concentration of) |
|---|
Discussion
设置打印浓度(Set the print concentration)
Declared In
TscCommand.h
– addDirection:
设置打印方向(Set the print direction)
- (void)addDirection:(int)directionParameters
direction |
方向(The direction of) |
|---|
Discussion
设置打印方向(Set the print direction)
Declared In
TscCommand.h
– addCls
清除打印缓冲区(Clear the print buffer)
- (void)addClsDiscussion
清除打印缓冲区(Clear the print buffer)
Declared In
TscCommand.h
– addTextwithX:withY:withFont:withRotation:withXscal:withYscal:withText:
在标签上绘制文字(Draws text on the label)
- (void)addTextwithX:(int)x withY:(int)y withFont:(NSString *)font withRotation:(int)rotation withXscal:(int)xScal withYscal:(int)yScal withText:(NSString *)textParameters
x |
横坐标(abscissa) |
|---|---|
y |
纵坐标(ordinate) |
font |
字体类型(Font type) |
rotation |
旋转角度(Rotation Angle) |
xScal |
横向放大(Lateral magnification) |
yScal |
纵向放大(Longitudinal magnification) |
text |
文字字符串(Literal string) |
Discussion
在标签上绘制文字(Draws text on the label)
Declared In
TscCommand.h
– addTextwithX:withY:withFont:withRotation:withXscal:withYscal:withText:encoding:
在标签上绘制文字(Draws text on the label)
- (void)addTextwithX:(int)x withY:(int)y withFont:(NSString *)font withRotation:(int)rotation withXscal:(int)xScal withYscal:(int)yScal withText:(NSString *)text encoding:(NSStringEncoding)encodingParameters
x |
横坐标(abscissa) |
|---|---|
y |
纵坐标(ordinate) |
font |
字体类型(Font type) |
rotation |
旋转角度(Rotation Angle) |
xScal |
横向放大(Lateral magnification) |
yScal |
纵向放大(Longitudinal magnification) |
text |
文字字符串(Literal string) |
encoding |
字符所用编码(Character encoding) |
Discussion
在标签上绘制文字(Draws text on the label)
Declared In
TscCommand.h
– addBitmapwithX:withY:withWidth:withHeight:withMode:withData:
打印图片(Print pictures)
- (void)addBitmapwithX:(int)x withY:(int)y withWidth:(int)width withHeight:(int)height withMode:(int)mode withData:(NSData *)dataParameters
x |
点阵影像的水平启始位置(The horizontal starting position of the lattice image) |
|---|---|
y |
点阵影像的垂直启始位置(The vertical starting position of the lattice image) |
width |
影像的宽度,以 byte 表示(The width of the image, expressed in byte) |
height |
影像的高度,以点(dot)表示(The height of the image, expressed as dot (dot)) |
mode |
影像绘制模式(Image rendering mode) 0 OVERWRITE 1 OR 2 XOR |
data |
影像数据(Image data) |
Discussion
打印图片(Print pictures)
Declared In
TscCommand.h
– addBitmapwithX:withY:withMode:withWidth:withImage:
打印图片(Print pictures)
- (void)addBitmapwithX:(int)x withY:(int)y withMode:(int)mode withWidth:(int)width withImage:(UIImage *)imageParameters
x |
点阵影像的水平启始位置(The horizontal starting position of the lattice image) |
|---|---|
y |
点阵影像的垂直启始位置(The vertical starting position of the lattice image) |
mode |
影像绘制模式(Image rendering mode) 0 OVERWRITE 1 OR 2 XOR |
width |
图片宽度(Image width) |
image |
需要打印的图片(A picture that needs to be printed) |
Discussion
打印图片(Print pictures)
Declared In
TscCommand.h
– addBitmapwithX:withY:withMode:withImage:
打印图片(Print pictures)
- (void)addBitmapwithX:(int)x withY:(int)y withMode:(int)mode withImage:(UIImage *)imageParameters
x |
点阵影像的水平启始位置(The horizontal starting position of the lattice image) |
|---|---|
y |
点阵影像的垂直启始位置(The vertical starting position of the lattice image) |
mode |
影像绘制模式(Image rendering mode) 0 OVERWRITE 1 OR 2 XOR |
image |
需要打印的图片(A picture that needs to be printed) |
Discussion
打印图片(Print pictures)
Declared In
TscCommand.h
– add1DBarcode:::
在标签上绘制一维条码(Draws a one-dimensional bar code on the label)
- (void)add1DBarcode:(int)x :Parameters
x |
横坐标(abscissa) |
|---|---|
y |
纵坐标(ordinate) |
barcodeType |
条码类型(Bar code type) |
height |
条码高度,默认为40(Bar code height, default is 40) |
readable |
是否可识别,0:人眼不可识,1:人眼可识(是否可识别,0:人眼不可识,1:人眼可识) |
rotation |
旋转角度,条形码旋转角度,顺时钟方向,0不旋转,90顺时钟方向旋转90度,180顺时钟方向旋转180度,270顺时钟方向旋转270度 Rotation Angle, Bar Code Rotation Angle, Clockwise, 0 does not rotate, 90 rotates 90 degrees Clockwise, 180 rotates 180 degrees Clockwise, 270 rotates 270 degrees Clockwise |
narrow |
默认值2,窄 bar 宽度,以点(dot)表示(Default value 2, narrow bar width, represented by dot (dot)) |
wide |
默认值4,宽 bar 宽度,以点(dot)表示(Default value 4, wide bar width, expressed as dot (dot)) |
content |
条码内容(Bar code content) |
Discussion
在标签上绘制一维条码(Draws a one-dimensional bar code on the label)
Declared In
TscCommand.h
– addQRCode:::
在标签上绘制QRCode二维码(Draw QRCode QR code on the label)
- (void)addQRCode:(int)x :Parameters
x |
横坐标(abscissa) |
|---|---|
y |
纵坐标(ordinate) |
ecclever |
选择QRCODE纠错等级,默认为L,L为7%,M为15%,Q为25%,H为30%(Select QRCode error correction level, default is L, L is 7%,M is 15%,Q is 25%,H is 30%) |
cellWidth |
二维码宽度1~10,默认为4(QR code width 1~10, the default is 4) |
mode |
默认为A,A为Auto,M为Manual(The default is A, A is Auto, and M is Manual) |
rotation |
旋转角度,默认为0,QRCode二维旋转角度,顺时钟方向,0不旋转,90顺时钟方向旋转90度,180顺时钟方向旋转180度,270顺时钟方向旋转270度() Rotation Angle, Bar Code Rotation Angle, Clockwise, 0 does not rotate, 90 rotates 90 degrees Clockwise, 180 rotates 180 degrees Clockwise, 270 rotates 270 degrees Clockwise |
content |
条码内容(Bar code content) |
Discussion
在标签上绘制QRCode二维码(Draw QRCode QR code on the label)
Declared In
TscCommand.h
– addPrint:::
执行打印(Perform print)
- (void)addPrint:(int)m :Parameters
m |
指定打印的份数(Specifies the number of copies to be printed) |
|---|---|
n |
每张标签需要重复打印的张数(Number of duplicate prints per label) |
Discussion
执行打印(Perform print)
Declared In
TscCommand.h
– addComonCommand
发送一些TSC的固定命令,在cls命令之前发送(Send some TSC fixed commands before CLS commands)
- (void)addComonCommandDiscussion
发送一些TSC的固定命令,在cls命令之前发送(Send some TSC fixed commands before CLS commands)
Declared In
TscCommand.h
– addSelfTest
打印自检页,打印测试页(Print the self-check page, print the test page)
- (void)addSelfTestDiscussion
打印自检页,打印测试页(Print the self-check page, print the test page)
Declared In
TscCommand.h
– queryPrinterType
查询打印机型号(Query Printer Type)
- (void)queryPrinterTypeDiscussion
查询打印机型号(Query Printer Type)
Declared In
TscCommand.h
– addPeel:
设置打印机剥离模式(Set printer stripping mode)
- (void)addPeel:(NSString *)peelParameters
peel |
ON/OFF 是否开启(Whether open) |
|---|
Discussion
设置打印机剥离模式(Set printer stripping mode)
Declared In
TscCommand.h
– addTear:
设置打印机撕离模式(Set the printer to tear mode)
- (void)addTear:(NSString *)tearParameters
tear |
ON/OFF 是否开启(Whether open) |
|---|
Discussion
设置打印机撕离模式(Set the printer to tear mode)
Declared In
TscCommand.h
– addCutter:
设置切刀是否有效(Sets whether the cutter is valid)
- (void)addCutter:(NSString *)cutterParameters
cutter |
是否开启 OFF/pieces(Whether open) |
|---|
Discussion
设置切刀是否有效(Sets whether the cutter is valid)
Declared In
TscCommand.h
– addPartialCutter:
设置切刀半切是否有效(Sets whether half cutting of the cutter is effective)
- (void)addPartialCutter:(NSString *)cutterParameters
cutter |
是否开启(Whether open) |
|---|
Discussion
设置切刀半切是否有效(Sets whether half cutting of the cutter is effective)
Declared In
TscCommand.h
– addSound:::
设置蜂鸣器(Set the buzzer)
- (void)addSound:(int)level :Parameters
level |
频率(frequency) |
|---|---|
interval |
时间ms(Time ms) |
Discussion
设置蜂鸣器(Set the buzzer)
Declared In
TscCommand.h
– addCashdrawer:::
打开钱箱命令,CASHDRAWER m,t1,t2(Open the cash box command,CASHDRAWER m,t1,t2)
- (void)addCashdrawer:(int)m :Parameters
m |
钱箱号 m 0,48 钱箱插座的引脚2 1,49 钱箱插座的引脚5 Cashbox No. M 0,48 Pins of Cashbox Socket 2, 1,49 Pins of Cashbox Socket 5 |
|---|---|
t1 |
高电平时间0 ≤ t1 ≤ 255输出由t1和t2设定的钱箱开启脉冲到由m指定的引脚 The high level time 0 ≤ T1 ≤ 255 outputs the moneybox opening pulse set by T1 and T2 to the pin specified by M |
t2 |
低电平时间0 ≤ t2 ≤ 255输出由t1和t2设定的钱箱开启脉冲到由m指定的引脚 Low level time 0 ≤ T2 ≤ 255 Output from the money box set by T1 and T2 opening pulse to pin specified by M |
Discussion
打开钱箱命令,CASHDRAWER m,t1,t2(Open the cash box command,CASHDRAWER m,t1,t2)
Declared In
TscCommand.h
– addBar:::
在标签上绘制黑块,画线(Draw a black block on the label and draw a line)
- (void)addBar:(int)x :Parameters
x |
起始横坐标(Initial abscissa) |
|---|---|
y |
起始纵坐标(Initial ordinate) |
width |
线宽,以点(dot)表示(Line width, expressed as dot (dot)) |
height |
线高,以点(dot)表示(The height of the line is indicated by a dot (dot)) |
Discussion
在标签上绘制黑块,画线(Draw a black block on the label and draw a line)
Declared In
TscCommand.h
– addBox:::
在标签上绘制矩形(Draws a rectangle on the label)
- (void)addBox:(int)xStart :Parameters
xStart |
起始横坐标(Initial abscissa) |
|---|---|
yStart |
起始纵坐标(Initial ordinate) |
xEnd |
终点横坐标(Terminal abscissa) |
yEnd |
终点纵坐标(Terminal ordinate) |
lineThickness |
矩形框线厚度或宽度,以点(dot)表示(The thickness or width of a rectangular frame line, denoted by a dot (dot)) |
Discussion
在标签上绘制矩形(Draws a rectangle on the label)
Declared In
TscCommand.h
– queryPrinterStatus
查询打印机状态(Query printer status)
- (void)queryPrinterStatusDiscussion
查询打印机状态(Query printer status)
Declared In
TscCommand.h
– addReverse:::
将指定的区域反向打印(黑色变成白色,白色变成黑色)(Prints the specified area backwards (black to white, white to black))
- (void)addReverse:(int)xStart :Parameters
xStart |
起始横坐标(Initial abscissa) |
|---|---|
yStart |
起始横坐标(Initial abscissa) |
width |
X坐标方向宽度,dot为单位(The width in the direction of the X coordinate, in dot) |
height |
Y坐标方向高度,dot为单位(The height in the Y direction, in dot) |
Discussion
将指定的区域反向打印(黑色变成白色,白色变成黑色)(Prints the specified area backwards (black to white, white to black))
Declared In
TscCommand.h
– addQueryPrinterStatus:
打印机打印完成时,自动返回状态。可用于实现连续打印功能 When the printer finishes printing, it returns to the state automatically. Can be used to achieve continuous printing function
- (void)addQueryPrinterStatus:(Response)responseParameters
response |
自动返回状态(Automatic return state) |
|---|
Discussion
打印机打印完成时,自动返回状态。可用于实现连续打印功能 When the printer finishes printing, it returns to the state automatically. Can be used to achieve continuous printing function
Declared In
TscCommand.h
– addBLine:::
设定黑标高度及定义标签印完后标签额外送出的长度 Set the height of the black label and define the extra length of the label after printing
- (void)addBLine:(int)m :Parameters
m |
黑标高度(0≤m≤1(inch),0≤m≤25.4(mm))(Height of black mark (0≤m≤1(inch), 0≤m≤25.4(mm))) |
|---|---|
n |
额外送出纸张长度 n≤标签纸纸张长度(inch或mm)(Extra paper length N ≤ label paper length (inch or mm)) |
Discussion
设定黑标高度及定义标签印完后标签额外送出的长度 Set the height of the black label and define the extra length of the label after printing
Declared In
TscCommand.h
– addCodepage:
添加代码页 Add a code page
- (void)addCodepage:(NSString *)codepageParameters
codepage |
字符集代表 Character set representation |
|---|
Discussion
添加代码页 Add a code page
Declared In
TscCommand.h
– queryElectricity
查询打印机电量(Query Printer Power)
- (void)queryElectricityDiscussion
查询打印机电量(Query Printer Power)
Declared In
TscCommand.h